/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:
 * Date: 2024-05-26
 * Time: 20:13
 */
class Student{
    private String name;
    private int age;
    private String stuNum;

    public static String className;
    public void show(){
        System.out.println("姓名" + name + "年龄" + age + "学号" + stuNum + "班级" + className);
    }
    public Student(String name, int age, String stuNum){
        this.name = name;
        this.age = age;
        this.stuNum = stuNum;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getStuNum() {
        return stuNum;
    }

    public void setStuNum(String stuNum) {
        this.stuNum = stuNum;
    }
}

public class Test {
    public static void main(String[] args) {
        Student student1 = null;
        student1.className = "1班";
        System.out.println(student1.className);
    }
    public static void main2(String[] args) {
        Student student1 = new Student("zhangsan",14,"123456");
        Student.className = "一班";
        Student student2 = new Student("lisi",15,"14589");
        student1.show();
        student2.show();
    }
}
